import { registerMicroApps } from 'qiankun'
import router from '../router'

registerMicroApps([
  {
    name: 'micro-vite',
    entry:
      process.env.NODE_ENV === 'development'
        ? '//localhost:8081'
        : '/micro-vite/',
    container: '#container',
    activeRule: '/main/micro-vite',
    props: { router, path: '/main/micro-vite' }
  },
  {
    name: 'micro-webpack',
    entry:
      process.env.NODE_ENV === 'development'
        ? '//localhost:8082'
        : '/micro-webpack/',
    container: '#container',
    activeRule: '/main/micro-webpack',
    props: { router, path: '/main/micro-webpack' }
  }
])
